package ${packageName}.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
<#list fields as field>
    <#if field.javaType == "LocalDateTime">
        import java.time.LocalDateTime;
    </#if>
</#list>

/**
* ${tableComment}
* @author ${author}
* @date ${date?string("yyyy-MM-dd")}
*/
@Data // Lombok注解：自动生成getter/setter/toString等
@TableName("${tableName}") // 对应数据库表名
public class ${entityName} implements Serializable {
private static final long serialVersionUID = 1L;

<#list fields as field>
    /**
    * ${field.columnComment}
    */
    <#if field.primaryKey>
        @TableId(type = IdType.AUTO) // 主键自增（如需雪花算法，修改为 IdType.ASSIGN_ID）
    </#if>
    private ${field.javaType} ${field.javaFieldName};

</#list>
}